<html>
<head><meta charset="utf-8"><title>unit testing · t-compiler/wg-polonius · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/index.html">t-compiler/wg-polonius</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html">unit testing</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="181209375"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181209375" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181209375">(Nov 20 2019 at 14:04)</a>:</h4>
<p>Re: testing, I think y'all were saying that the "unit test" premise of polonius doesn't quite seem to be living up to its potential?</p>



<a name="181209378"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181209378" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181209378">(Nov 20 2019 at 14:04)</a>:</h4>
<p>If so, I agree</p>



<a name="181209394"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181209394" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181209394">(Nov 20 2019 at 14:04)</a>:</h4>
<p>it <em>feels</em> like we should be able to write smaller, targeted tests</p>



<a name="181209418"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181209418" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181209418">(Nov 20 2019 at 14:05)</a>:</h4>
<p>but the relations etc are so complex</p>



<a name="181209448"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181209448" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181209448">(Nov 20 2019 at 14:05)</a>:</h4>
<p>I'm breaking this into a separate topic, but I want to compare to chalk</p>



<a name="181209457"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181209457" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181209457">(Nov 20 2019 at 14:05)</a>:</h4>
<p>in Chalk, we have a much more extensive unit testing harness</p>



<a name="181209464"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181209464" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181209464">(Nov 20 2019 at 14:05)</a>:</h4>
<p>that takes in Rust syntax, effectively, and desugars it</p>



<a name="181209492"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181209492" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181209492">(Nov 20 2019 at 14:06)</a>:</h4>
<p>and we are now working on getting that "desugaring" to be shared between rust + chalk, as well</p>



<a name="181209531"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181209531" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181209531">(Nov 20 2019 at 14:06)</a>:</h4>
<p>I wonder if that is what polonius needs -- i.e., if we could find ways to share the fact generation</p>



<a name="181209546"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181209546" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181209546">(Nov 20 2019 at 14:06)</a>:</h4>
<p>the chalk subset seems more focused than what we're testing in polonius tho</p>



<a name="181209548"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181209548" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181209548">(Nov 20 2019 at 14:06)</a>:</h4>
<p>and model MIR etc using traits or whatever else</p>



<a name="181209552"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181209552" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181209552">(Nov 20 2019 at 14:06)</a>:</h4>
<blockquote>
<p>the chalk subset seems more focused than what we're testing in polonius tho</p>
</blockquote>
<p>I'm not sure if this is true</p>



<a name="181209574"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181209574" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181209574">(Nov 20 2019 at 14:06)</a>:</h4>
<p>ok, I think it is true :)</p>



<a name="181209584"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181209584" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181209584">(Nov 20 2019 at 14:06)</a>:</h4>
<p>but what I mean is</p>



<a name="181209590"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181209590" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181209590">(Nov 20 2019 at 14:07)</a>:</h4>
<p>:)</p>



<a name="181209627"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181209627" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181209627">(Nov 20 2019 at 14:07)</a>:</h4>
<p>I guess I think that with some effort we could probably find a "simplified" representation</p>



<a name="181209642"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181209642" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181209642">(Nov 20 2019 at 14:07)</a>:</h4>
<p>I hoped we could write rust in unit tests and be able to test the polonius output, but wondered if "in-progress" work where we have to walk in lockstep between 2 wip branches would still be required anyway</p>



<a name="181209712"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181209712" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181209712">(Nov 20 2019 at 14:08)</a>:</h4>
<p>In any case I don't think, sadly,</p>



<a name="181209719"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181209719" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181209719">(Nov 20 2019 at 14:08)</a>:</h4>
<p>well I have q uestion actually</p>



<a name="181209721"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181209721" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181209721">(Nov 20 2019 at 14:08)</a>:</h4>
<p>(which would also alleviate the need to store .facts in the repo for example)</p>



<a name="181209725"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181209725" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181209725">(Nov 20 2019 at 14:08)</a>:</h4>
<p>hmm</p>



<a name="181209729"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181209729" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181209729">(Nov 20 2019 at 14:08)</a>:</h4>
<p>I was going to suggest</p>



<a name="181209738"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181209738" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181209738">(Nov 20 2019 at 14:08)</a>:</h4>
<p>maybe rustc should invoke a polonius executable</p>



<a name="181209755"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181209755" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181209755">(Nov 20 2019 at 14:08)</a>:</h4>
<p>that may still be a good idea, I guess</p>



<a name="181209764"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181209764" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181209764">(Nov 20 2019 at 14:08)</a>:</h4>
<p>it would at least allow us to rapidly iterate on polonius</p>



<a name="181209781"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181209781" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181209781">(Nov 20 2019 at 14:08)</a>:</h4>
<p>but it wouldn't help if you need to tweak rustc fact generation</p>



<a name="181209800"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181209800" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181209800">(Nov 20 2019 at 14:09)</a>:</h4>
<p>that said</p>



<a name="181209804"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181209804" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181209804">(Nov 20 2019 at 14:09)</a>:</h4>
<p>I anticipate we may be leaving that phase soon</p>



<a name="181209824"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181209824" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181209824">(Nov 20 2019 at 14:09)</a>:</h4>
<p>I guess it just means we can't have our out of tree cake and eat it too :)</p>



<a name="181209827"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181209827" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181209827">(Nov 20 2019 at 14:09)</a>:</h4>
<p>once we have subset errors + initialization facts</p>



<a name="181209835"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181209835" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181209835">(Nov 20 2019 at 14:09)</a>:</h4>
<p>I don't think there is much more data</p>



<a name="181209837"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181209837" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181209837">(Nov 20 2019 at 14:09)</a>:</h4>
<p>yeah</p>



<a name="181209862"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181209862" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181209862">(Nov 20 2019 at 14:09)</a>:</h4>
<p>anywaY I think it's probably something to ponder for later</p>



<a name="181209868"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181209868" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181209868">(Nov 20 2019 at 14:09)</a>:</h4>
<p>more than try to address today</p>



<a name="181209927"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181209927" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181209927">(Nov 20 2019 at 14:10)</a>:</h4>
<p>yeah agreed, in the meantime a combination of ergonomics improvement over the status quo could be enough</p>



<a name="181209943"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181209943" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181209943">(Nov 20 2019 at 14:10)</a>:</h4>
<p>(some of which you might be able to see, and imagine, in the current PR)</p>



<a name="181210033"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181210033" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181210033">(Nov 20 2019 at 14:11)</a>:</h4>
<p>One last thought though</p>



<a name="181210038"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181210038" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181210038">(Nov 20 2019 at 14:11)</a>:</h4>
<p>when doing the NLL modeling early on</p>



<a name="181210092"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181210092" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181210092">(Nov 20 2019 at 14:12)</a>:</h4>
<p>I had a setup that took as input a very simple set of input programs</p>



<a name="181210094"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181210094" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181210094">(Nov 20 2019 at 14:12)</a>:</h4>
<p>with actions like <code>X = ...</code> and so forth</p>



<a name="181210102"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181210102" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181210102">(Nov 20 2019 at 14:12)</a>:</h4>
<p>that was still really useful for modeling patterns and showing examples</p>



<a name="181210108"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181210108" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181210108">(Nov 20 2019 at 14:12)</a>:</h4>
<p>I am basically imagining we might make a harness that takes a simple "Rust-like" input language</p>



<a name="181210125"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181210125" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181210125">(Nov 20 2019 at 14:12)</a>:</h4>
<p>hmm I remember some of this</p>



<a name="181210179"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181210179" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181210179">(Nov 20 2019 at 14:13)</a>:</h4>
<p>I wonder how far we are from this with the current test "programs" and otherwise whether we could reuse this machinery easily</p>



<a name="181210208"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181210208" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181210208">(Nov 20 2019 at 14:13)</a>:</h4>
<p>I think we're .. "close-ish"</p>



<a name="181210285"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181210285" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181210285">(Nov 20 2019 at 14:14)</a>:</h4>
<p>ah I may also be misremembering <a href="https://github.com/nikomatsakis/nll-souffle" target="_blank" title="https://github.com/nikomatsakis/nll-souffle">https://github.com/nikomatsakis/nll-souffle</a></p>



<a name="181210370"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181210370" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181210370">(Nov 20 2019 at 14:15)</a>:</h4>
<p>ah most likely eg <a href="https://github.com/nikomatsakis/borrowck/blob/master/test/arielb1-loop-carry-drop.nll" target="_blank" title="https://github.com/nikomatsakis/borrowck/blob/master/test/arielb1-loop-carry-drop.nll">https://github.com/nikomatsakis/borrowck/blob/master/test/arielb1-loop-carry-drop.nll</a></p>



<a name="181210396"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181210396" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181210396">(Nov 20 2019 at 14:15)</a>:</h4>
<p>yeah interesting</p>



<a name="181210476"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181210476" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181210476">(Nov 20 2019 at 14:16)</a>:</h4>
<p>yes</p>



<a name="181210481"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181210481" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181210481">(Nov 20 2019 at 14:16)</a>:</h4>
<p>that particular syntax etc evolved very organically</p>



<a name="181210486"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181210486" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181210486">(Nov 20 2019 at 14:16)</a>:</h4>
<p>and I remember being annoyed with it :)</p>



<a name="181210495"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/unit%20testing/near/181210495" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/unit.20testing.html#181210495">(Nov 20 2019 at 14:17)</a>:</h4>
<p>but I think we have a better idea what we want now</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>